#pragma once

#ifdef WIN32  
#pragma execution_character_set("utf-8")  
#endif

#include <qlist.h>

class VDelayCount
{
public:
	VDelayCount();
	~VDelayCount();

	enum Unit
	{
		us,
		ms
	};

	enum STC_zlj
	{
		STC_Y1,
		STC_Y3,
		STC_Y5,
		STC_Y6
	};

	struct VZl_table
	{
		float nop;
		float push;
		float pop;
		float ret;
		float move;
		float call;
		float djnz;
	};

	QString get_delay_function(int us, int type, int hz, int unit);

private:
	QList<int> _list;
	int power(int x, int n);
	int get_number(int sum, int level);
	int get_level(int n);
	QList<int> get_array(int sum);
	void recursion(int sum, int level);
	QString get_nop_str(int num);
};

